package com.yn.pet.bus.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 设备信息表(DeviceInfo)表实体类
 *
 * @author makejava
 * @since 2025-07-09 12:00:46
 */
@Data
@TableName("t_device_info")
@EqualsAndHashCode(callSuper = true)
public class DeviceInfo extends Model<DeviceInfo> {
    //设备ID
    @TableId
    private Long deviceId;
    //设备IMEI号
    private String imei;
    //JT808协议类型
    private String protocolType;
    //设备名称
    private String deviceName;
    //设备型号
    private String deviceModel;
    //固件版本
    private String firmwareVersion;
    //制造商
    private String factory;
    //激活时间
    private Date activateTime;
    //电池电量(0-100)
    private Integer batteryLevel;
    //最后在线时间
    private Date lastOnlineTime;
    //定位模式
    private Integer locationType;
    //IP地址
    private String serverIp;
    //IP端口
    private String serverPort;
    //数据状态1有效0无效
    private Integer dataStatus;

    //设备状态 1 运动  2 静止 3 离线
    private Integer deviceStatus;

    //创建时间
    private Date createTime;

    //状态变更时间
    private Date statusChangeTime;
    //创建人
    private String createBy;
    //更新时间
    private Date updateTime;
    //更新人
    private String updateBy;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.deviceId;
    }
}

